#include "poker_nenchi.cpp" 

enum oPor_xl {
	nGongJ, nFanYu, nNenDng, nNull    //英雄的能力属性
};
enum oPor_ry {
	m_Ruam, m_Yimg, m_Jinz, m_Wuyr    //软, 硬, 禁, 无 
};

class z_XuLie_oPor{    //状态类 
	protected: 
		oPor_xl _e_Mole__;           //状态影响类型 
		unsigned int n_Mum;          //状态影响效能
		unsigned int n_Mum_huih;     //状态影响回合数
		oPor_ry m_Ry;                //影响态性
	public:
		z_XuLie_oPor():_e_Mole__(nNull),n_Mum(0),n_Mum_huih(0),m_Ry(m_Wuyr){} 
		z_XuLie_oPor(const z_XuLie_oPor& x_xlpr){
			this->_e_Mole__ = x_xlpr.get_eZtlx();
			this->n_Mum = x_xlpr.get_nMum();
			this->n_Mum_huih = x_xlpr.get_nMumHuih();
			this->m_Ry = x_xlpr.get_mRuanying();
		}
	    z_XuLie_oPor(oPor_xl const e, unsigned int const nM, unsigned int const n_Mhu, oPor_ry const m_ry):
		    _e_Mole__(e), n_Mum(nM), n_Mum_huih(n_Mhu), m_Ry(m_ry) {
			}
		
		// 所有getter函数都添加const修饰符
		oPor_xl get_eZtlx() const {
			return _e_Mole__;
		} 
		unsigned int get_nMum() const {
			return n_Mum;
		}
		unsigned int get_nMumHuih() const {
			return n_Mum_huih;
		}
		oPor_ry get_mRuanying() const {
			return m_Ry;
		}
}; 

struct z_xPor_list {
    z_XuLie_oPor z_xopor;
    z_xPor_list* ptr_next;  // 修正拼写错误，保持与结构体名称一致
    
    // 添加构造函数，显式初始化成员
    z_xPor_list(const z_XuLie_oPor& z, z_xPor_list* ptr_z = NULL)  // 使用NULL兼容旧编译器
        : z_xopor(z), ptr_next(ptr_z) {}  // 修正成员名拼写
}; 

class zTai_list{
protected:
    z_xPor_list zp_lis_top;    //首位 
    z_xPor_list* z_sj;     //滑轮 
public:
	zTai_list():z_sj(NULL),zp_lis_top(z_XuLie_oPor()){} 
    zTai_list(z_xPor_list p_lis):zp_lis_top(p_lis){
    	z_sj = &zp_lis_top;
	} 
    
    // 使用NULL代替nullptr以兼容C++03
    zTai_list(z_XuLie_oPor z)          //, z_xPor_list* ptr_z = NULL
        :zp_lis_top(z, NULL){
        z_sj = &zp_lis_top;
        for(;z_sj->ptr_next!=NULL;){
        	z_sj = z_sj->ptr_next;
		}
	}
	
	z_xPor_list* get_lisTop_ptr(){
		return &zp_lis_top;
	}
	
	zTai_list* set_puth(z_xPor_list zlis_puth){
		z_sj->ptr_next = &zlis_puth;
		z_sj = z_sj->ptr_next;
		for(;z_sj->ptr_next!=NULL;){
        	z_sj = z_sj->ptr_next;
		}
		return this;
	}
}; 

template<typename T,int N>    //T = s_QIshi_obj,s_ZHangShi_obj,s_dUnWei_obj; 
class nhero_oopjob{
	protected:
		T n_jHero;
		n_Soupai_kz<N> nhero_poker_sp;
		zTai_list zt_lis;
	public:
		nhero_oopjob(T dj,n_Soupai_kz<N> nhp):n_jHero(dj),nhero_poker_sp(nhp){}
};


enum zUang_Jia {Ty_1='1',Ty_2='2',Ty_3='3'};
template<typename t1,typename t2,typename t3>  //t = nhero_oopjob
class n_YuanZhuo{        //圆桌；
	protected:
		t1 nHero_one;
		t2 nHero_two;
		t3 nHero_three;
		zUang_Jia zuan;
	public: 
	    n_YuanZhuo(t1 one,t2 two,t3 three,zUang_Jia z=Ty_1):
		    nHero_one(one),nHero_two(two),nHero_three(three),zuan(z){
			}
		
};


// 辅助结构体：通用版本
template<typename t_Tyir, int n>
struct get_nPoker_impl {
    static int calc(zhi_Ye__<t_Tyir>& obj,n_Soupai_kz<n> zvr) {
    	//  vector<int> v_tor = obj._zhiYeir__.get_HeroNliyr();
        return n; // 通用实现
    }
};

// 辅助结构体：特化n=1的情况
template<typename t_Tyir>
struct get_nPoker_impl<t_Tyir, 1> {
    static int calc(zhi_Ye__<t_Tyir>& obj,n_Soupai_kz<1> zvr) {
    	vector<int> v_tor = obj._zhiYeir__.get_HeroNliyr();
        return v_tor[0]; // n=1的特定实现
    }
};

// 特化n=2的情况
template<typename t_Tyir>
struct get_nPoker_impl<t_Tyir, 2> {
    static int calc(zhi_Ye__<t_Tyir>& obj,n_Soupai_kz<2> zvr) {
    	vector<int> v_tor = obj._zhiYeir__.get_HeroNliyr();
        return v_tor[1]+v_tor[2]; // n=2的特定实现
    }
};

// 继续特化其他n值（n=3,4,5,7）
template<typename t_Tyir>
struct get_nPoker_impl<t_Tyir, 3> {
    static int calc(zhi_Ye__<t_Tyir>& obj,n_Soupai_kz<3> zvr) {
    	vector<int> v_tor = obj._zhiYeir__.get_HeroNliyr();
        return v_tor[0] + 1;
    }
};

template<typename t_Tyir>
struct get_nPoker_impl<t_Tyir, 4> {
    static int calc(zhi_Ye__<t_Tyir>& obj,n_Soupai_kz<4> zvr) {
        return 4;
    }
};

template<typename t_Tyir>
struct get_nPoker_impl<t_Tyir, 5> {
    static int calc(zhi_Ye__<t_Tyir>& obj,n_Soupai_kz<5> zvr) {
        return 5;
    }
};

template<typename t_Tyir>
struct get_nPoker_impl<t_Tyir, 7> {
    static int calc(zhi_Ye__<t_Tyir>& obj,n_Soupai_kz<7> zvr) {
        return 7;
    }
};